package raochang.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import raochang.service.ReadersService;


/**
 * <p>
 * 读者管理-目前按照班级 前端控制器
 * </p>
 *
 * @author itheima
 */

@RestController
@RequestMapping("/readers")
public class ReaderController {

    @Autowired
    private ReadersService readersService;
    private static final String session = "YTczZTA3NzQtYTc2ZC00YTljLTg1YzItNjJkODU5MWU0YzFh";

    /**
     * 导入读者数据入库
     *
     * @return
     */
    @GetMapping("/importReads")
    public String importReads() {
        System.out.println("请求进入了----");
        readersService.importReads(session);
        return "导入成功";
    }

}
